import 'package:flutter/material.dart';
import 'package:untitled2/pages/tab/TabList.dart';

class ThreeClass extends StatefulWidget {
  const ThreeClass({Key? key}) : super(key: key);

  @override
  State<ThreeClass> createState() => _ThreeClassState();
}

class _ThreeClassState extends State<ThreeClass> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: const Text("分类3"),
        ),
        body: Center(
          child: GestureDetector(
            onTap: () {
              // 跳转根目录
              Navigator.of(context).pushAndRemoveUntil(MaterialPageRoute(builder: (BuildContext context) {
                return TabList(index:4);
              }), (route) => false);
            },
            child: Container(
              width: 300,
              height: 300,
              color: Colors.blue,
              alignment: Alignment.center,
              child: const Text("跳转到首页我的", style: TextStyle(color: Colors.white, fontSize: 18)),
            ),
          ),
        ));
  }
}
